﻿@model ContactManagement.Models.EditUserModel
@{
    ViewBag.Title = PageTitles.EditUserRESX;
}

<div class="span12">
    <h2>@PageTitles.EditRESX - @PageTitles.EditUserRESX</h2>
    <hr />
</div>

<div class="span12">
    @using (Html.BeginForm(EActions.Edit.ToString(), EControllers.User.ToString(), FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <fieldset>
            @Html.MyValidationSummary()
            <div class="control-group">
                @Html.LabelFor(model => model.UserTitle, new { @class = "control-label" })
                <div class="controls">
                    @Html.DropDownListFor(model => model.UserTitle, Model.UserTitles, GlobalStrings.PleaseSelectItemsRESX)
                    @Html.ValidationMessageFor(model => model.UserTitle)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Firstname, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Firstname)
                    @Html.ValidationMessageFor(model => model.Firstname)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Lastname, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Lastname)
                    @Html.ValidationMessageFor(model => model.Lastname)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Handy, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Handy)
                    @Html.ValidationMessageFor(model => model.Handy)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Birthdate, new { @class = "control-label" })
                <div class="controls">
                    @Html.EditorFor(model => model.Birthdate)
                    @Html.ValidationMessageFor(model => model.Birthdate)
                </div>
            </div>
            <div class="form-actions">
                <input class="btn btn-primary" type="submit" value="@Navigation.SaveChangesRESX" />
            </div>
        </fieldset>
    }
</div>

<div class="span12">
    <div class="well">
        @Html.ActionLink(Navigation.BackToUserDetailsRESX, EActionUser.Details.ToString(), EControllers.User.ToString(), new { id = CurrentSession.GetCurrentUser().ID }, new { @class = "btn btn-small", data_icon = "icon-arrow-left" })
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
